package com.wissen.visitor;
/**
 * this is visitor class which shows concept of Visitor Pattern
 * @author wissen16
 */
public class Visitor{
	   public static State list[] = { new Kashmir(), new Uttaranchal(), new Himachal() };
	   /**
	    * method to visualise Visitor Pattern
	    * @param args console input 
	    */
	   public static void main( String[] args ) {
		   VisitorCome    come   = new VisitorCome();
		   VisitorGone  gone = new VisitorGone();
	      for (int i=0; i < list.length; i++) {
	         list[i].getvisit(come);
	      }
	      for (int i=0; i < list.length; i++) {
	         list[i].leavestate(gone);
	      }
	   }
}